package com.wd.tw.service;

import java.util.List;
import com.wd.common.utils.DateUtils;
import javax.annotation.Resource;

import com.wd.tw.domain.entity.ElevatorCameraBox;
import com.wd.tw.mapper.ElevatorCameraBoxMapper;
import org.springframework.stereotype.Service;


/**
 * 相机及盒子映射Service业务层处理
 * 
 * @author liumingkun
 * @date 2025-01-07
 */
@Service
public class ElevatorCameraBoxService
{
    @Resource
    private ElevatorCameraBoxMapper elevatorCameraBoxMapper;

    /**
     * 查询相机及盒子映射
     * 
     * @param cameraBoxId 相机及盒子映射主键
     * @return 相机及盒子映射
     */
    public ElevatorCameraBox selectElevatorCameraBoxByCameraBoxId(Long cameraBoxId)
    {
        return elevatorCameraBoxMapper.selectElevatorCameraBoxByCameraBoxId(cameraBoxId);
    }

    /**
     * 查询相机及盒子映射列表
     * 
     * @param elevatorCameraBox 相机及盒子映射
     * @return 相机及盒子映射
     */
    public List<ElevatorCameraBox> selectElevatorCameraBoxList(ElevatorCameraBox elevatorCameraBox)
    {
        return elevatorCameraBoxMapper.selectElevatorCameraBoxList(elevatorCameraBox);
    }

    /**
     * 新增相机及盒子映射
     * 
     * @param elevatorCameraBox 相机及盒子映射
     * @return 结果
     */
    public int insertElevatorCameraBox(ElevatorCameraBox elevatorCameraBox)
    {
        elevatorCameraBox.setCreateTime(DateUtils.getNowDate());
        return elevatorCameraBoxMapper.insertElevatorCameraBox(elevatorCameraBox);
    }

    /**
     * 修改相机及盒子映射
     * 
     * @param elevatorCameraBox 相机及盒子映射
     * @return 结果
     */
    public int updateElevatorCameraBox(ElevatorCameraBox elevatorCameraBox)
    {
        elevatorCameraBox.setUpdateTime(DateUtils.getNowDate());
        return elevatorCameraBoxMapper.updateElevatorCameraBox(elevatorCameraBox);
    }

    /**
     * 批量删除相机及盒子映射
     * 
     * @param cameraBoxIds 需要删除的相机及盒子映射主键
     * @return 结果
     */
    public int deleteElevatorCameraBoxByCameraBoxIds(Long[] cameraBoxIds)
    {
        return elevatorCameraBoxMapper.deleteElevatorCameraBoxByCameraBoxIds(cameraBoxIds);
    }

    /**
     * 删除相机及盒子映射信息
     * 
     * @param cameraBoxId 相机及盒子映射主键
     * @return 结果
     */
    public int deleteElevatorCameraBoxByCameraBoxId(Long cameraBoxId)
    {
        return elevatorCameraBoxMapper.deleteElevatorCameraBoxByCameraBoxId(cameraBoxId);
    }
}
